package cool.tsy.emos.wx.db.dao;

import cool.tsy.emos.wx.db.pojo.TbDept;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author WangHongxuan
 * @since 2021-09-24
 */
@Mapper
public interface TbDeptDao {

    /**
     * <h2>查询部门成员数量</h2>
     */
    ArrayList<HashMap> searchDeptMembers(String keyword);

    /**
     * <h2>查询部门列表</h2>
     */
    List<TbDept> searchAllDept();

    /**
     * <h2>添加部门</h2>
     */
    int insertDept(String deptName);

    /**
     * <h2>根据id删除部门</h2>
     */
    int deleteDeptById(int id);

    /**
     * <h2>根据id更新部门信息</h2>
     */
    int updateDeptById(TbDept entity);

}
